# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: 05_列表生成式.py
# Time: 13:55


a = [{i: v} for i in range(0, 100, 3) for v in range(i + 1)]
# print(a)

# print([range(1,1000000000000000000)])

# python2中 range的风险 如果生成的列表太多就会占用很多内存空间 会报错

# python3 已解决该内存风险问题

c = [i for i in range(10) if i % 2 == 0]
print(c)

d = [(i, j) for i in range(3) for j in range(2)]
print(d)
